﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZK.Common;

namespace ZK.HardWareBLL
{
    /// <summary>
    /// 上站票管理
    /// </summary>
    public class USMBLL
    {
        private static readonly string Action_ = AppConfigHelper.GetAppSettings("USMIp");
        public static Models.USMReceiveM SendMessage(Models.DeliveryInfo m)
        {
            string url = InterfaceExecute.GetUSMUrl(Action_);
            string ret;
            try
            {
                ret = HttpClientUtil.doPostMethodToString(url, Newtonsoft.Json.JsonConvert.SerializeObject(m));
            }
            catch (Exception ex)
            {
                Common.Log4.LogManage.WriteErr(ex.ToString());
                return null;
            }
            return Newtonsoft.Json.JsonConvert.DeserializeObject<Models.USMReceiveM>(ret);

        }
    }
}
